CC=gcc
LD=ld
CFLAGS=-Wall -std=gnu99
CFDEFS=-D_LARGEFILE64_SOURCE -DTARGET_LINUX
CFLIBS=-ltiff -lnsl -lc -lm
IDIRS=-I/usr/include
LDIRS=-L/usr/lib -L.

help:
	@echo "fontfactory"
	@echo "====================================================="
	@echo "This is a sample utilizing the libtiff library."
	@echo "The program takes the TIFF formatted files containing"
	@echo "glyphs of a characters. The TIFF is uncompressed, "
	@echo "binary image. The output is sent to STDOUT, formatted"
	@echo "for the gLCD controllers (PCF8548)."
	@echo " "
	@echo "Usage:"
	@echo "------"
	@echo "help        display this screen"
	@echo "release     build the fontfactory program"
	@echo "debug       build the fontfactory program"
	@echo "clear       removes the fontfactory and object files"
	@echo " "
	@echo "IMPORTANT: 

release: *.c Makefile
	${CC} -o ptc ${CFLAGS} -O3 ${IDIRS} ${CFDEFS} $< ${LDIRS} ${CFLIBS}

debug: *.c Makefile
	${CC} -o ptc ${CFLAGS} -O0 -g ${IDIRS} ${CFDEFS} $< ${LDIRS} ${CFLIBS}

clear:
	rm ptc
	rm *.o
